﻿@model ScheduleTaskModel
@{
    ViewBag.Title = Loc["Admin.System.ScheduleTasks.Edit"];
}
<form asp-area="@Constants.AreaAdmin" asp-controller="ScheduleTask" asp-action="EditScheduler" method="post">
    <div asp-validation-summary="All"></div>

    <input asp-for="Id" type="hidden"/>
    <div class="row">
        <div class="col-md-12">
            <div class="x_panel light form-fit">
                <div class="x_title">
                    <div class="caption">
                        <i class="fa fa-tasks"></i>
                        @Loc["Admin.System.ScheduleTasks"]
                        <small>
                            <i class="fa fa-arrow-circle-left"></i>
                            @Html.ActionLink(Loc["Admin.System.ScheduleTasks.BackToList"], "List")
                        </small>
                    </div>
                    <div class="actions">
                        <div class="btn-group btn-group-devided">
                            <button class="btn btn-success" type="submit" name="save">
                                <i class="fa fa-check"></i> @Loc["Admin.Common.Save"]
                            </button>
                            <button class="btn btn-success" type="submit" name="save-continue">
                                <i class="fa fa-check-circle"></i> @Loc["Admin.Common.SaveContinue"]
                            </button>
                        </div>
                    </div>
                </div>
                <div class="x_content form">
                    <div class="form-horizontal">
                        <div class="form-body">
                            <div class="form-group">
                                <admin-label asp-for="ScheduleTaskName"/>
                                <div class="col-md-9 col-sm-9">
                                    <label class="control-label"> @Html.DisplayFor(model => model.ScheduleTaskName) </label>
                                </div>
                            </div>
                            <div class="form-group">
                                <admin-label asp-for="LeasedByMachineName"/>
                                <div class="col-md-9 col-sm-9">
                                    <admin-input asp-for="LeasedByMachineName"/>
                                </div>
                            </div>                            
                            <div class="form-group">
                                <admin-label asp-for="Enabled"/>
                                <div class="col-md-9 col-sm-9">
                                    <label class="mt-checkbox mt-checkbox-outline control control-checkbox">
                                        <admin-input asp-for="Enabled"/>
                                        <div class="control__indicator"></div>
                                    </label>
                                    <span asp-validation-for="Enabled"></span>
                                </div>
                            </div>
                            <div class="form-group">
                                <admin-label asp-for="StopOnError"/>
                                <div class="col-md-9 col-sm-9">
                                    <label class="mt-checkbox mt-checkbox-outline control control-checkbox">
                                        <admin-input asp-for="StopOnError"/>
                                        <div class="control__indicator"></div>
                                    </label>
                                    <span asp-validation-for="StopOnError"></span>
                                </div>
                            </div>
                            <div class="form-group" id="trTimeInterval">
                                <admin-label asp-for="TimeInterval"/>
                                <div class="col-md-9 col-sm-9">
                                    <admin-input asp-for="TimeInterval"/>
                                    <span asp-validation-for="TimeInterval"></span>
                                </div>
                            </div>
                            <div class="form-group">
                                <admin-label asp-for="StoreId"/>
                                <div class="col-md-9 col-sm-9">
                                    <admin-select asp-for="StoreId" asp-items="Model.AvailableStores"/>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</form>